/*
 *   Copyright (C) Key Bridge Global LLC and/or its affiliates.
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.keybridgeglobal.wsif.enumerated;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;

/**
 * <p>Java class for enumKeyGeneratorAlgorithm.
 * <p/>
 * <p>The following schema fragment specifies the expected content contained
 * within this class. <p>
 * <pre>
 * &lt;simpleType name="enumKeyGeneratorAlgorithm">
 *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     &lt;enumeration value="AES"/>
 *     &lt;enumeration value="ARCFOUR"/>
 *     &lt;enumeration value="BLOWFISH"/>
 *     &lt;enumeration value="DES"/>
 *     &lt;enumeration value="DESEDE"/>
 *     &lt;enumeration value="HmacMD5"/>
 *     &lt;enumeration value="HmacSHA1"/>
 *     &lt;enumeration value="HmacSHA256"/>
 *     &lt;enumeration value="HmacSHA384"/>
 *     &lt;enumeration value="HmacSHA512"/>
 *     &lt;enumeration value="RC2"/>
 *   &lt;/restriction>
 * &lt;/simpleType>
 * </pre>
 * <p/>
 */
@XmlType(name = "enumKeyGeneratorAlgorithm")
@XmlEnum
public enum EnumKeyGeneratorAlgorithm {

  AES("AES"),
  ARCFOUR("ARCFOUR"),
  BLOWFISH("BLOWFISH"),
  DES("DES"),
  DESEDE("DESEDE"),
  @XmlEnumValue("HmacMD5")
  HMAC_MD_5("HmacMD5"),
  @XmlEnumValue("HmacSHA1")
  HMAC_SHA_1("HmacSHA1"),
  @XmlEnumValue("HmacSHA256")
  HMAC_SHA_256("HmacSHA256"),
  @XmlEnumValue("HmacSHA384")
  HMAC_SHA_384("HmacSHA384"),
  @XmlEnumValue("HmacSHA512")
  HMAC_SHA_512("HmacSHA512"),
  @XmlEnumValue("RC2")
  RC_2("RC2");
  private final String value;

  EnumKeyGeneratorAlgorithm(String v) {
    value = v;
  }

  public String value() {
    return value;
  }

  public static EnumKeyGeneratorAlgorithm fromValue(String v) {
    for (EnumKeyGeneratorAlgorithm c : EnumKeyGeneratorAlgorithm.values()) {
      if (c.value.equals(v)) {
        return c;
      }
    }
    throw new IllegalArgumentException(v);
  }
}
